package com.example.crossborderecommerce.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 仓库
 *
 * @author Yolanda
 * @since 2024-05-09
 */
@Data
@Accessors(chain = true)
@TableName("store")
public class Store implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("address")
    private String address;

    @TableField("type")
    private String type;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //指定格式
    private LocalDateTime createTime;

    @TableField("admin_id")
    private Integer adminId;

    @TableField(exist = false)
    private String adminName;

    @TableField("admin_role")
    private String adminRole;

    @TableField("store_manager_id")
    private Integer storeManagerId;

    @TableField(exist = false)
    private String storeManagerName;

}
